#define _page(page, url, para)
#setLocal(pageNumber = page.pageNumber??1)
#setLocal(totalPage = page.totalPage??1)
#setLocal(isFirstPage = pageNumber==1)
#setLocal(isLastPage = pageNumber==totalPage)
<div>
  <div class="layui-box layui-laypage layui-laypage-default">
    #if(isFirstPage)
    <a class="layui-laypage-prev layui-disabled"><i class="layui-icon">&#xe603;</i></a>
    #elseif(pageNumber > 1)
    <a href="#(url + '/' + (pageNumber-1))" class="layui-laypage-prev"><i class="layui-icon">&#xe603;</i></a>
    #end
    #if(totalPage < 7)
        #for(x : [1..totalPage])
            #if(x == pageNumber)
            <span class="layui-laypage-curr"><em class="layui-laypage-em"></em><em>#(x)</em></span>
            #else
            <a href="#(url + '/' + x)">#(x)</a>
            #end
        #end
    #elseif(pageNumber <=3 || pageNumber >=totalPage-2)
        #for(x : [1..3])
            #if(x == pageNumber)
            <span class="layui-laypage-curr"><em class="layui-laypage-em"></em><em>#(x)</em></span>
            #else
            <a href="#(url + '/' + x)">#(x)</a>
            #end
        #end
        <span class="layui-laypage-spr">…</span>
        #for(x : [totalPage-2..totalPage])
            #if(x == pageNumber)
            <span class="layui-laypage-curr"><em class="layui-laypage-em"></em><em>#(x)</em></span>
            #else
            <a href="#(url + '/' + x)">#(x)</a>
            #end
        #end
    #else
        #for(x : [1..3])
            #if(x == pageNumber)
            <span class="layui-laypage-curr"><em class="layui-laypage-em"></em><em>#(x)</em></span>
            #else
            <a href="#(url + '/' + x)">#(x)</a>
            #end
        #end
        #if(pageNumber > 4)
        <span class="layui-laypage-spr">…</span>
        #end
        <span class="layui-laypage-curr"><em class="layui-laypage-em"></em><em>#(pageNumber)</em></span>
        #if(pageNumber < totalPage-3)
        <span class="layui-laypage-spr">…</span>
        #end
        #for(x : [totalPage-2..totalPage])
            #if(x == pageNumber)
            <span class="layui-laypage-curr"><em class="layui-laypage-em"></em><em>#(x)</em></span>
            #else
            <a href="#(url + '/' + x)">#(x)</a>
            #end
        #end
    #end
    #if(isLastPage)
    <a class="layui-laypage-next layui-disabled"><i class="layui-icon">&#xe602;</i></a>
    #elseif(pageNumber < totalPage)
    <a href="#(url + '/' + (pageNumber+1))" class="layui-laypage-next #(isLastPage?'layui-disabled':'')"><i class="layui-icon">&#xe602;</i></a>
    #end
    <span class="layui-laypage-skip">到第<input id="inputPageNum" type="text" min="1" max="#(pageSize)" value="#(pageNumber)" class="layui-input">页<button type="button" class="layui-laypage-btn" onclick="window.location.href='#(url)/'+document.getElementById('inputPageNum').value">确定</button></span>
    <span class="layui-laypage-count">当前<font size=+1>#(page.list==null?0:page.list.size())</font>条</span>
    <span class="layui-laypage-count">共<font size=+1>#(page.totalRow??0)</font>条</span>
<script type="text/javascript">
$(function(){
  $('#inputPageNum').bind('keypress',function(event){
    if (event.keyCode == '13') {$('span .layui-laypage-btn').trigger("click");}
  });
});
</script>
  </div>
</div>
#end